package com.duanjw.springframework.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@Controller
public class TestController {

    @GetMapping("/query")
    @ResponseBody
    public String query(){
        System.out.println("TestController.query");
        return "1";
    }

    @PostMapping("upload")
    public void upload(@RequestPart("file") MultipartFile file){
        System.out.println(file);
    }
}
